<template>
	<div class="swiper">
		<mt-swipe :auto="4000">
           <mt-swipe-item v-for="item in photoList" :key="item">
           	<!-- <img :src="item" :style="{width:isFull?'100%':'auto'}"> -->
           	<img :src="item" :class="{isFull}">
           </mt-swipe-item>
        </mt-swipe>
	</div>
</template>

<script>
	export default {
		data:function  () {
			return {
			}
		},
		methods:{},
		computed:{
			photoList:function  () {
				var arr = [];
				//-----------------------------------等AJAX的数据来  不来就是空 避免报错
				if(this.images){
					arr = this.images;
					//图片过多时的处理
					if(arr.length>10){
						arr = arr.splice(0,10);
					}
				}
				return arr
			}
		},
		props:["images","isFull"],
		created(){
			// console.log(this.isFull)
		}

	}
</script>

<style lang="scss" scoped>
	.isFull {
		width: 100%;
	}
	.mint-swipe {
		height: 200px;

		.mint-swipe-item{
			&:nth-child(1){
				background-color:red;
			}
			&:nth-child(2){
				background-color:green;
			}
			&:nth-child(3){
				background-color:blue;
			}

			img {
					height: 100%;
			}
		}
	}

</style>